package com.cfs.svcimpl.bz;

import java.util.List;
import com.cfs.dao.bz.TreeNodeDao;
import com.cfs.po.bz.TreeNode;
import com.cfs.svc.bz.TreeNodeService;
import com.cfs.vo.Condition;

public class TreeNodeServiceImpl implements TreeNodeService{

	TreeNodeDao dao; 
	
	
	public TreeNodeDao getDao() {
		return dao;
	}


	public void setDao(TreeNodeDao dao) {
		this.dao = dao;
	}


	public Long add(TreeNode t) {
		Long n = dao.insert(t);
		System.out.println("RETURN TreeNode NUM: " + n + " ID:" + t.getId() );
		return t.getId();
	}


	public int deleteById(Long id) {
		return dao.delete(id);
	}


	public TreeNode get(Long id) {
		return dao.get(id);
	}


	public List<TreeNode> list(Condition c) {
		return dao.list(c);
	}


	public List<TreeNode> listAll() {
		return dao.listAll();
	}


	public Long update(TreeNode t) {
		return dao.update(t);
	}


	public List<TreeNode> query(Long col_id) {		
		return dao.query(col_id);
	}

}
